home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 2000 July / macformat-092.iso / Fireworks 3 / Settings / Commands / Document / Reverse All Frames.jsf < prev    next >
Encoding:
Text File  |  1999-11-19  |  500 b   |  22 lines

  1. // Copyright (c) 1999 Macromedia. All rights reserved.
  2.  
  3. var numberFrames = 0;
  4. var lastFrame = 0;
  5.  
  6. // Count the number of frames
  7. // by checking the first layer (at index zero)
  8. var firstLayer = fw.getDocumentDOM().layers[0];
  9. for (f in firstLayer.frames) {
  10.     numberFrames++;
  11. }
  12.  
  13. // Calculate the index of the last frame
  14. lastFrame = numberFrames - 1;
  15.  
  16. // Move each frame to its new position
  17. for (count = 0 ; count < numberFrames ; count++){
  18.     fw.getDocumentDOM().reorderFrame(lastFrame, count, false);
  19.  }
  20.  
  21.  
  22.